<template>
    <MusicListDetailTop />
    <MusicListDetailAll />
    <VideoListPopup />
</template>

<script lang='ts' setup>
import store from '@/store';
import { onMounted } from 'vue'
import { useRoute } from 'vue-router';
import MusicListDetailTop from '@/components/MusicListDetailTop/index.vue'
import MusicListDetailAll from '@/components/MusicListDetailAll/index.vue'
import VideoListPopup from '@/components/VideoListPopup/index.vue'
onMounted(async () => {
    let id = useRoute().query.id;
    const res = await store.dispatch('getMusicListDetail', id)
    if (res.data.code === 200) {
        store.commit('updateMusicListDetail', res.data.playlist)
    }
    const allRes = await store.dispatch('getMusicListAll', id)
    if (allRes.data.code === 200) {
        store.commit('updateMusicListAll', allRes.data.songs)
    }
})
</script>
 
<style lang = "less" scoped>

</style>